In recent years, compact digital cameras and single-lens reflex digital cameras have become mainstream, instead of cameras using silver-halide films.
In the silver-halide film age, phase difference autofocus was carried out by a triangulation method, with a sensor dedicated to autofocus (hereinafter referred to as AF) provided in order to carry out focusing automatically.
However, with digitalization, some compact digital cameras carry out contrast autofocus, in which the focus lens position leading to the sharpest image is searched for while driving the focus lens in the same way as video cameras. This allows cost reduction due to elimination of a conventional sensor dedicated to AF, resolution of parallax with an optical viewfinder, or AF upgrade when using a telephoto lens.
As a method for carrying out AF on an imaging plane, there is a method of using an image sensor which has a structure as shown in FIGS. 10A and 10B (Japanese Patent Laid-Open No. 1-216306). In Japanese Patent Laid-Open No. 1-216306, a pair of pixels an and bn is placed with respect to a microlens Fn to form a pixel row including such multiple pairs of pixels, as shown in FIGS. 10A and 10B. This structure guides light fluxes from an object, which pass through different areas of a photographing lens, onto the pairs of pixels, and the focusing state can be thus detected from the relative positional relationship among image signals of an object image obtained from each of the pairs of pixels. However, the pixels an and bn are configured with a ½ pitch relative to the pitch of a normal pixel 13, and it is not practical to configure the pixels with a ½ pitch because, in mainstream image sensors with an increasing number of pixels, typically the pixels are made as small as possible.
In addition, an image forming apparatus for forming an image of a subject has been proposed that eliminates the need for a secondary optical system for focus detection by distinguishing optical characteristics for some pixels of an image sensor in the image forming apparatus from those for the other pixels and using the signals thus obtained for focus detection (Japanese Patent No. 3592147).
According to Japanese Patent No. 3592147, at least one set of pairs of pixels for use in focus detection (hereinafter, referred to as “focus detection pixels”) is provided for some pixels of the image sensor. FIG. 11 shows a pixel arrangement of an image sensor including focus detection pixels in a specific line. In FIG. 11, R, G, and B respectively denote pixels with a red filter, a green filter, and a blue filter arranged on their light incidence planes. S1 and S2 denote focus detection pixels for focus detection, which have different optical characteristics from each other.
The structure of the focus detection pixel S1 is shown in. FIG. 12A. In FIG. 12A, the focus detection pixel S1 includes a microlens 501 on top. Reference numeral 502 denotes a flattening layer for constituting a plane for forming the microlens. Reference numeral 503 denotes a shielding layer with an (eccentric) opening offset from the center of a photoelectric conversion area of the pixel. The shielding layer 503 has an aperture effect of limiting incident light. Reference 504 denotes a photoelectric conversion element.
The structure of the focus detection pixel S2 is shown in FIG. 12B. FIG. 12B is different from FIG. 12A in that an opening of a shielding layer 603 is provided symmetrically about the center of the optical axis with respect to the opening in the shielding layer 503 of the focus detection pixel S1.
In FIG. 11, a row including focus detection pixels S1 and a row including focus detection pixels S2 come to form an approximate image as the number of pixels increases. If in focus, image signals of the row including the focus detection pixels S1 and image signals of the row including the focus detection pixels S2 are in agreement with each other. If out of focus, a phase difference is caused between image signals of the row including the focus detection pixels S1 and image signals of the row including the focus detection pixels S2. The direction of the phase shift is reversed between in the case of defocus toward the front of the camera and in the case of defocus toward the rear of the camera. In the case of viewing an image forming optical system from the focus detection pixels S1 and in the case of viewing the image forming optical system from the focus detection pixels S2, the image forming optical system appears as if the pupils are symmetrically divided with respect to the optical center.
FIGS. 13A and 13B are schematic diagrams for explaining phase shift due to an image out of focus. In FIGS. 13A and 13B, the focus detection pixels S1 and S2 shown in FIG. 11 are portrayed schematically as a single line, wherein the focus detection pixels S1 and S2 are respectively denoted by points A and B. For the sake of simplicity, illustration of each pixel of RGB for forming images is omitted in the figures, and the figures are presented as if the focus detection pixels S1 and S2 only are provided.
Light from a specific point of a subject is divided into a light ray (ΦLa) entering a point A through a pupil corresponding to the point A and a light ray (ΦLb) entering a point B through a pupil corresponding to the point B. The two light rays come from the same point, and thus reach one point bundled by the same microlens, with the focus of the image forming optical system on the surface of the image sensor (FIG. 13A). However, for example, in the case of the focus being on a point just a distance x in front of the surface, the two bundles of rays are shifted from each other by a distance corresponding to a change in the incident angles of the rays (FIG. 13B). Alternatively, the two bundles of rays are shifted in the reverse direction in the case of the focus being on a point just a distance x in back of the surface.
Accordingly, image signals obtained from a sequence of points A and image signals obtained from a sequence of points B are in agreement with each other if the image forming optical system is in-focus, or shifted from each other if the image forming optical system is not in-focus.
In the image forming apparatus described in Japanese Patent No. 3592147, focus detection is carried out on the basis of the principle described above.
As described above, a pair of focus detection pixels for AF is assigned to two pixels in the image forming apparatus disclosed in Japanese Patent No. 3592147. Therefore, the focus detection pixels have the same circuit layout as normal pixels and require only the limitation of the openings, and the production process can be thus easily configured without affecting the imaging performance of the normal pixels. However, although the image signals for use in the phase difference autofocus ideally correspond to the same subject image, strictly speaking the image signals are shifted by two pixels in the vertical direction in the configuration shown in FIG. 10, and there is a possibility of focus detection errors depending on the subject.
Although digital images sampled by the image sensor are obtained, an optical low-pass filter is provided for the normal pixels so as not to form an image on the imaging plane at a spatial frequency greater than a sampling frequency, thereby preventing moiré from being caused.
However, the decrease of the normal pixels around the focus detection pixels reduces the effect the optical low-pass filter, and has a possibility of causing moiré.
The focus detection pixels need to be arranged along the direction of detection in order to carry out phase difference autofocus. However, when the focus detection pixels are closely arranged, there is a possibility that linear traces will appear in images. As a countermeasure, it is conceivable to arrange the focus detection pixels dispersedly. However, in that case, it is believed that aliasing of high frequencies will be prone to be caused due to decrease in the sampling frequency of the focus detection pixels, leading to errors in focusing.
Moreover, in general, weaknesses of phase difference autofocus include a repetitive pattern. This repetitive pattern is due to false focus detection of phases which are coincident with each other when correlation between a pair of image signals is obtained and which appear at multiple sites, and is the same for the configuration of Japanese Patent No. 3592147.